package hmis.pos.Entity;

import hmis.pos.Base.BaseEntity.BaseEntity;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name="roommessage")
public class RoomMessage extends BaseEntity implements Serializable {

    //一种房间类型对应多个房间信息
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name="type",referencedColumnName = "type",insertable = false,updatable = false)
    private RoomType roomType;

    //房间号 唯一
    @Column(name="roomid",unique = true,nullable = false)
    private int roomid;

    //房间类型
    @Column(name="type",nullable = false)
    private String type;

    //房间当前状态
    @Column(name="status")
    private String status;

    public RoomType getRoomType() {
        return roomType;
    }

    public void setRoomType(RoomType roomType) {
        this.roomType = roomType;
    }

    public int getRoomid() {
        return roomid;
    }

    public void setRoomid(int roomid) {
        this.roomid = roomid;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "RoomMessage{" +
                "roomid=" + roomid +
                ", type='" + type + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
